package com.unidt.www.module.expert.controller.admin;

import com.unidt.www.framework.common.pojo.CommonResult;
import com.unidt.www.module.expert.service.InvitationConditionService;
import com.unidt.www.module.expert.vo.ShieldingConditionVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author sk
 * @Description:
 * @Date 2022/12/20 15:38
 **/
@Api(tags = "专家邀约-屏蔽条件")
@RestController
@RequestMapping("/expert/condition")
public class ConditionController {

    @Autowired
    InvitationConditionService invitationConditionService;

    /**
     * 功能描述: 获取屏蔽条件
     * @author sk
     * @date 2023/1/3
     * @param invitationId
     * @return com.unidt.www.framework.common.pojo.CommonResult<com.unidt.www.module.expert.vo.ShieldingConditionVo>
     */
    @GetMapping("/getCondition/{invitationId}")
    @ApiOperation(value = "获取屏蔽条件")
    public CommonResult<ShieldingConditionVo> getCondition(@PathVariable(value = "invitationId") Long invitationId){

        return  CommonResult.success(invitationConditionService.getDetail(invitationId)) ;
    }
}
